#ifndef __933D3BFC_373A_4e6a_8AEF_3E489E04BC1E__
#define __933D3BFC_373A_4e6a_8AEF_3E489E04BC1E__

/////////////////////////////////////////////////////////////////////////////////////////
// 
namespace xos
{
    // 
    // misc interface
    // 
    class i_misc
    {
    public:
        virtual ~i_misc(){}

    public:
        // 
        // utf8 to wchar
        // 
        virtual int utf8_to_wchar( const char * lpszSrc, int nSrcByteSize, wchar_t * lpszDest, int nDestByteSize, int * lpnDestNeedSize ) = 0;

        // 
        // wcharto utf8
        // 
        virtual int wchar_to_utf8( const wchar_t * lpszSrc, int nSrcByteSize, char * lpszDest, int nDestByteSize, int * lpnDestNeedSize ) = 0;

        // 
        // get process full file name
        // 
        virtual int get_process_file_full_name( char * pszFile, int nLen, int * pnLenNeeded ) = 0;

        // 
        // get process file path. including '\\' or '/'
        // 
        virtual int get_process_path( char * pszPath, int nLen, int * pnLenNeeded ) = 0;

        // 
        // append path in all platform
        // 
        virtual int path_append( char * lpszPath, const char * lpszAdder ) = 0;

        // 
        // create guid
        // 
        virtual int create_guid( char * lpszGuid ) = 0;

        // 
        // sleep 1 / 1000 second
        // 
        virtual int sleep( int nMilliseconds ) = 0;

        // 
        // output debug info
        // 
        virtual int out_put_debug_string( const char * lpszInfo ) = 0;
        virtual int out_put_to_cmd( const char * lpszInfo ) = 0;
        virtual int trace( const char * lpszFormat, ... ) = 0;

        // 
        // get seconds from since 1970-1-1
        // 
        virtual xos_u64 get_wall_second( xos_u64 * lpWallSecond ) = 0;

        // 
        // get process ID
        // 
        virtual xos_u64 get_current_process_id() = 0;

        // 
        // get thread ID
        // 
        virtual xos_u64 get_current_thread_id() = 0;

        // 
        // get cpu num
        // 
        virtual int get_cpu_num() = 0;

        // 
        // release
        // 
        virtual int release() = 0;
    };
}

#endif // __933D3BFC_373A_4e6a_8AEF_3E489E04BC1E__
